<template>
  <div>
    <h1>app</h1>
    <Child2 :msg="msg"></Child2>
  </div>
</template>

<!-- <script>
import Child2 from './Child2.vue'
export default {
  data() {
    return {
      msg: '父组件的数据',
    }
  },
  components: {
    Child2,
  },
}
</script> -->
<script setup>
import { ref } from 'vue'
import Child2 from './Child2.vue'
const msg = ref('父组件的数据')
</script>
<style
  lang="scss"
  scoped
></style>
